package com.wwj.auction.admin.controller;


import com.wwj.auction.admin.entity.vo.GetOutVo;
import com.wwj.auction.admin.entity.vo.PageModel;
import com.wwj.auction.admin.service.GetOutService;
import com.wwj.auction.common.result.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * <p>
 * 前端控制器
 * </p>
 *
 * @author wwj
 * @since 2021-08-25
 */
@RestController
@RequestMapping("/admin/getout")
public class GetOutController {

    @Autowired
    private GetOutService getOutService;

    /**
     * 获取店铺的违规记录，
     *
     * @param page
     * @param limit
     * @param keyword
     * @return
     */
    @GetMapping("/list/{storeId}/{page}/{limit}")
    public R list(
            @PathVariable("storeId") Integer storeId,
            @PathVariable("page") Integer page,
            @PathVariable("limit") Integer limit,
            @RequestParam(value = "keyword", required = false) String keyword) {
        PageModel<GetOutVo> pageModel = getOutService.list(storeId, page, limit, keyword);
        return R.ok().data("pageModel", pageModel);
    }
}

